﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iLangl.Model;
using iLangl.Transport.Communication;

namespace iLangl.BusinessModel.Actions
{
	public class OrderProject : BaseSecurityAction
	{
		Project _project;

		public override int TimeOutInMinutes
		{
			get
			{
				return 120;
			}
		}

		private ActionResult _actionResult = null;
		public ActionResult ActionResult
		{
			get
			{
				return _actionResult;
			}
		}

		public OrderProject(Project project)
			: base()
		{
			RequestContext = new ProjectTPRequestContext();
			_project = project;
			RequestContext.SetContext(_project);

			ActionResultResponseContext responsecontext = new ActionResultResponseContext();
			ResponseContext = responsecontext;
			responsecontext.ContextUpdated += new EventHandler(responsecontext_ContextUpdated);
			
		}

		void responsecontext_ContextUpdated(object sender, EventArgs e)
		{
			weGetResult();
		}


		protected override string GetName()
		{
			return "OrderProject";
		}

		protected override string GetVersion()
		{
			return "1";
		}
	}
}
